<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#">{:lang('回收站列表')}</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="get" action="">
        分类：
        <select class="form-control" name="cid">
            <option value="">全部</option>
            {$select_category}
        </select>

        商品名:
        <input type="text" class="form-control" name="keywords" style="width: 120px;"
               value="{:input('request.keywords','')}" placeholder="请输入{:lang('商品名')}">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('index')}">清空</a>
    </form>
    <style>tr th {
        text-align: center
    }</style>
    <table class="table table-hover table-bordered text-center">
        <thead>
        <tr>
            <th>{:lang('分类')}</th>
            <th>{:lang('标题')}</th>
            <th>{:lang('封面')}</th>
            <th>{:lang('展示价格')}</th>
            <th>{:lang('状态')}</th>
            <th>{:lang('ACTIONS')}</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="datas" item="data">
            <tr>
                <td>{$data.cname}</td>
                <td>{$data.title}</td>
                <td>
                    <a href="javascript:imagePreviewDialog('{:cmf_get_image_url($data.img)}');">
                        <img src="{:cmf_get_image_url($data.img)}" height="30px;">
                    </a>
                </td>
                <td>{$data.showprice}</td>
                <td>
                    <switch name="$data['status']">
                        <case value="1">上架中</case>
                        <case value="0">已下架</case>
                    </switch>
                </td>
                <td>
                    <a href="{:url('isback',array('id'=>$data['id']))}" class="js-ajax-delete btn btn-danger"
                       data-msg="将恢复到商品列表中！">恢复商品</a>
                    <a href="{:url('isDelete',array('id'=>$data['id']))}" class="js-ajax-delete btn btn-danger"
                       data-msg="删除之后不可恢复！">彻底删除</a>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination"> {$datas->render()}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>